﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using ChrysalisTest.Controllers;
using ChrysalisTest.ViewModels;

namespace ChrysalisTest.Views
{
    public partial class ChooserPage : PhoneApplicationPage
    {
        public ChooserPage()
        {
            InitializeComponent();

            var controller = new ChoosersController();
            controller.Initialize(this);
        }

        private void savePhoneNumberButton_Click(object sender, RoutedEventArgs e)
        {
            // TODO : Do this via commanding on the ViewModel!!!

            var viewModel = this.DataContext as ChoosersViewModel;

            viewModel.SavePhoneNumber();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            // TODO : Do this via commanding on the ViewModel!!!

            var viewModel = this.DataContext as ChoosersViewModel;

            viewModel.ChoosePhoneNumber();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            // TODO : Do this via commanding on the ViewModel!!!

            var viewModel = this.DataContext as ChoosersViewModel;

            viewModel.TakePhoto();
        }
    }
}